//
//  AlertView.m
//  XMLY
//
//  Created by 曾杰 on 15/11/5.
//  Copyright © 2015年 曾杰. All rights reserved.
//

#import "AlertView.h"

@implementation AlertView

+ (UIAlertController *)createAlertViewWithMessage:(NSString *)message actionTitle:(NSString *)title otherTitle:(NSString *)otherTitle 
{
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:message preferredStyle:(UIAlertControllerStyleAlert)];
    if (title != nil) {
        UIAlertAction *action1 = [UIAlertAction actionWithTitle:title style:(UIAlertActionStyleDefault) handler:nil];
        [alert addAction:action1];
    }
    if (otherTitle != nil) {
        UIAlertAction *action2 = [UIAlertAction actionWithTitle:otherTitle style:(UIAlertActionStyleDefault) handler:nil];
        [alert addAction:action2];
    }
    return alert;
}


@end
